class Solution:
    def wiggleSort(self, nums) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        nums.sort()
        cp = nums.copy()
        stratIndex = int(len(nums)/2 + 0.5) - 1
        for i in range(len(nums)//2):
            nums[2*i] = cp[stratIndex-i]
            nums[2*i+1] = cp[-1-i]
        if len(nums)%2!=0:
            nums[-1] = cp[0]


if __name__ == '__main__':
    so = Solution()
    nums = [4,5,5,6]
    r = so.wiggleSort(nums)
    print(nums)
